package com.yubest.javaagent;

import java.lang.instrument.Instrumentation;

/**
 * 在主程序运行之后运行
 *
 * @Author: hweiyu
 * @Date: 2022/12/13 10:41
 */
public class MainAgent {

    public static void agentmain(String args, Instrumentation inst) {
        System.out.println("agentmain start");
        System.out.println(args);

        for (Class<?> allLoadedClass : inst.getAllLoadedClasses()) {
            System.out.println(allLoadedClass.getName());
        }
    }
}
